/*
This is the migration script to update the database with the set of uncommitted changes you selected.

You can customize the script, and your edits will be used in deployment.
The following objects will be affected:
  dbo.Author_Image, tSQLt.Private_RenamedObjectLog, tSQLt.CaptureOutputLog,
  tSQLt.TestResult, tSQLt.Run_LastExecution, tSQLt.TestMessage,
  tSQLt.Private_GetOriginalTableInfo, tSQLt.Private_GetCleanSchemaName,
  tSQLt.Private_GetLastTestNameIfNotProvided,
  tSQLt.Private_GetDataTypeOrComputedColumnDefinition, tSQLt.Info,
  tSQLt.Private_ResolveSchemaName, tSQLt.Private_GetIdentityDefinition,
  tSQLt.Private_GetQuotedTableNameForConstraint, tSQLt.Private_IsTestClass,
  tSQLt.Private_GetFullTypeName, tSQLt.Private_ResolveObjectName,
  tSQLt.Private_GetQuotedFullName, tSQLt.F_Num,
  tSQLt.Private_GetDefaultConstraintDefinition,
  tSQLt.Private_GetOriginalTableName, tSQLt.Private_GetConstraintType,
  tSQLt.Private_FindConstraint, tSQLt.Private_QuoteClassNameForNewTestClass,
  tSQLt.Private_GetForeignKeyDefinition, tSQLt.TestCaseSummary,
  tSQLt.Private_ResolveName, tSQLt.Private_GetSchemaId,
  tSQLt.GetTestResultFormatter, tSQLt.Private_ResolveApplyConstraintParameters,
  tSQLt.Private_GetCleanObjectName,
  tSQLt.Private_ResolveFakeTableNamesForBackwardCompatibility, tSQLt,
  tSQLt.Private, tSQLt.TestClasses, tSQLt.Tests, tSQLt.AssertEqualsTable,
  tSQLt.StubRecord, SQLCop.test Decimal Size Problem,
  tSQLt.DefaultResultFormatter, tSQLt.XmlResultFormatter, tSQLt.Run,
  tSQLt.Private_CleanTestResult, tSQLt.Private_ApplyForeignKeyConstraint,
  SQLCop.test Procedures using dynamic SQL without sp_executesql,
  tSQLt.FakeTable, tSQLt.CaptureOutput, tSQLt.RunAll, tSQLt.RunWithNullResults,
  tSQLt.RunTestClass, tSQLt.Private_Print, tSQLt.Private_CreateProcedureSpy,
  tSQLt.Private_ValidateProcedureCanBeUsedWithSpyProcedure, tSQLt.DropClass,
  tSQLt.Private_SaveTestNameForSession, tSQLt.Private_CreateFakeOfTable,
  tSQLt.AssertObjectExists, tSQLt.Private_RunTest, tSQLt.SetTestResultFormatter,
  tSQLt.LogCapturedOutput, tSQLt.Private_ApplyCheckConstraint,
  tSQLt.TableCompare, tSQLt.Private_MarkFakeTable, tSQLt.ResultSetFilter,
  tSQLt.Private_RunTestClass, tSQLt.TableToText,
  tSQLt.Private_ValidateFakeTableParameters, tSQLt.GetNewTranName,
  tSQLt.Private_PrintXML, tSQLt.SuppressOutput,
  tSQLt.Private_MarkObjectBeforeRename, SQLCop.test Procedures With SET
  ROWCOUNT, SQLCop.test Procedures Named SP_, tSQLt.NewConnection,
  tSQLt.Private_SetFakeViewOn_SingleView, tSQLt.Private_RunAll,
  tSQLt.SpyProcedure, tSQLt.Private_DisallowOverwritingNonTestSchema,
  tSQLt.Private_MarkSchemaAsTestClass, tSQLt.Private_SetFakeViewOff_SingleView,
  tSQLt.SetFakeViewOn, tSQLt.NewTestClass, tSQLt.RunTest, tSQLt.SetFakeViewOff,
  tSQLt.Uninstall, tSQLt.AssertEqualsString,
  tSQLt.Private_RenameObjectToUniqueName, tSQLt.Private_Run, SQLCop.test
  Procedures with @@Identity, tSQLt.RunWithXmlResults,
  tSQLt.Private_RenameObjectToUniqueNameUsingObjectId,
  tSQLt.NullTestResultFormatter, tSQLt.AssertResultSetsHaveSameMetaData,
  tSQLt.Fail, tSQLt.AssertEquals, tSQLt.Private_OutputTestResults,
  tSQLt.ApplyConstraint, tSQLtCLR
*/

SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
PRINT N'Dropping foreign keys from [dbo].[Author_Image]'
GO
ALTER TABLE [dbo].[Author_Image] DROP CONSTRAINT[FK_Author_Image_Author]
ALTER TABLE [dbo].[Author_Image] DROP CONSTRAINT[FK_Author_Image_Image]
GO
PRINT N'Dropping constraints from [tSQLt].[Private_RenamedObjectLog]'
GO
ALTER TABLE [tSQLt].[Private_RenamedObjectLog] DROP CONSTRAINT [PK__Private_RenamedObjectLog__Id]
GO
PRINT N'Dropping constraints from [tSQLt].[CaptureOutputLog]'
GO
ALTER TABLE [tSQLt].[CaptureOutputLog] DROP CONSTRAINT [PK__CaptureO__3214EC072739D489]
GO
PRINT N'Dropping constraints from [tSQLt].[TestResult]'
GO
ALTER TABLE [tSQLt].[TestResult] DROP CONSTRAINT [PK__TestResu__3214EC076B24EA82]
GO
PRINT N'Dropping [tSQLt].[NullTestResultFormatter]'
GO
DROP PROCEDURE [tSQLt].[NullTestResultFormatter]
GO
PRINT N'Dropping [tSQLt].[RunTest]'
GO
DROP PROCEDURE [tSQLt].[RunTest]
GO
PRINT N'Dropping [tSQLt].[SetTestResultFormatter]'
GO
DROP PROCEDURE [tSQLt].[SetTestResultFormatter]
GO
PRINT N'Dropping [tSQLt].[StubRecord]'
GO
DROP PROCEDURE [tSQLt].[StubRecord]
GO
PRINT N'Dropping [tSQLt].[AssertResultSetsHaveSameMetaData]'
GO
DROP PROCEDURE [tSQLt].[AssertResultSetsHaveSameMetaData]
GO
PRINT N'Dropping [tSQLt].[NewConnection]'
GO
DROP PROCEDURE [tSQLt].[NewConnection]
GO
PRINT N'Dropping [tSQLt].[ResultSetFilter]'
GO
DROP PROCEDURE [tSQLt].[ResultSetFilter]
GO
PRINT N'Dropping [tSQLt].[CaptureOutput]'
GO
DROP PROCEDURE [tSQLt].[CaptureOutput]
GO
PRINT N'Dropping [tSQLt].[Private_GetConstraintType]'
GO
DROP FUNCTION [tSQLt].[Private_GetConstraintType]
GO
PRINT N'Dropping [tSQLt].[Private_GetOriginalTableName]'
GO
DROP FUNCTION [tSQLt].[Private_GetOriginalTableName]
GO
PRINT N'Dropping [tSQLt].[F_Num]'
GO
DROP FUNCTION [tSQLt].[F_Num]
GO
PRINT N'Dropping [tSQLt].[Info]'
GO
DROP FUNCTION [tSQLt].[Info]
GO
PRINT N'Dropping [tSQLt].[Private_GetCleanSchemaName]'
GO
DROP FUNCTION [tSQLt].[Private_GetCleanSchemaName]
GO
PRINT N'Dropping [tSQLt].[ApplyConstraint]'
GO
DROP PROCEDURE [tSQLt].[ApplyConstraint]
GO
PRINT N'Dropping [tSQLt].[AssertEquals]'
GO
DROP PROCEDURE [tSQLt].[AssertEquals]
GO
PRINT N'Dropping [tSQLt].[RunWithXmlResults]'
GO
DROP PROCEDURE [tSQLt].[RunWithXmlResults]
GO
PRINT N'Dropping [tSQLt].[Private_ResolveApplyConstraintParameters]'
GO
DROP FUNCTION [tSQLt].[Private_ResolveApplyConstraintParameters]
GO
PRINT N'Dropping [SQLCop].[test Procedures with @@Identity]'
GO
DROP PROCEDURE [SQLCop].[test Procedures with @@Identity]
GO
PRINT N'Dropping [tSQLt].[AssertEqualsString]'
GO
DROP PROCEDURE [tSQLt].[AssertEqualsString]
GO
PRINT N'Dropping [tSQLt].[Uninstall]'
GO
DROP PROCEDURE [tSQLt].[Uninstall]
GO
PRINT N'Dropping [tSQLt].[SetFakeViewOff]'
GO
DROP PROCEDURE [tSQLt].[SetFakeViewOff]
GO
PRINT N'Dropping [tSQLt].[Private_SetFakeViewOff_SingleView]'
GO
DROP PROCEDURE [tSQLt].[Private_SetFakeViewOff_SingleView]
GO
PRINT N'Dropping [tSQLt].[NewTestClass]'
GO
DROP PROCEDURE [tSQLt].[NewTestClass]
GO
PRINT N'Dropping [tSQLt].[DropClass]'
GO
DROP PROCEDURE [tSQLt].[DropClass]
GO
PRINT N'Dropping [tSQLt].[Private_QuoteClassNameForNewTestClass]'
GO
DROP FUNCTION [tSQLt].[Private_QuoteClassNameForNewTestClass]
GO
PRINT N'Dropping [tSQLt].[Private_MarkSchemaAsTestClass]'
GO
DROP PROCEDURE [tSQLt].[Private_MarkSchemaAsTestClass]
GO
PRINT N'Dropping [tSQLt].[SetFakeViewOn]'
GO
DROP PROCEDURE [tSQLt].[SetFakeViewOn]
GO
PRINT N'Dropping [tSQLt].[Private_SetFakeViewOn_SingleView]'
GO
DROP PROCEDURE [tSQLt].[Private_SetFakeViewOn_SingleView]
GO
PRINT N'Dropping [tSQLt].[Private_DisallowOverwritingNonTestSchema]'
GO
DROP PROCEDURE [tSQLt].[Private_DisallowOverwritingNonTestSchema]
GO
PRINT N'Dropping [tSQLt].[SpyProcedure]'
GO
DROP PROCEDURE [tSQLt].[SpyProcedure]
GO
PRINT N'Dropping [tSQLt].[Private_ValidateProcedureCanBeUsedWithSpyProcedure]'
GO
DROP PROCEDURE [tSQLt].[Private_ValidateProcedureCanBeUsedWithSpyProcedure]
GO
PRINT N'Dropping [tSQLt].[Private_FindConstraint]'
GO
DROP FUNCTION [tSQLt].[Private_FindConstraint]
GO
PRINT N'Dropping [tSQLt].[Private_GetOriginalTableInfo]'
GO
DROP FUNCTION [tSQLt].[Private_GetOriginalTableInfo]
GO
PRINT N'Dropping [SQLCop].[test Procedures Named SP_]'
GO
DROP PROCEDURE [SQLCop].[test Procedures Named SP_]
GO
PRINT N'Dropping [SQLCop].[test Procedures With SET ROWCOUNT]'
GO
DROP PROCEDURE [SQLCop].[test Procedures With SET ROWCOUNT]
GO
PRINT N'Dropping [tSQLt].[Tests]'
GO
DROP VIEW [tSQLt].[Tests]
GO
PRINT N'Dropping [tSQLt].[Private_ApplyCheckConstraint]'
GO
DROP PROCEDURE [tSQLt].[Private_ApplyCheckConstraint]
GO
PRINT N'Dropping [tSQLt].[Private_RenameObjectToUniqueNameUsingObjectId]'
GO
DROP PROCEDURE [tSQLt].[Private_RenameObjectToUniqueNameUsingObjectId]
GO
PRINT N'Dropping [tSQLt].[LogCapturedOutput]'
GO
DROP PROCEDURE [tSQLt].[LogCapturedOutput]
GO
PRINT N'Dropping [tSQLt].[Private_CreateProcedureSpy]'
GO
DROP PROCEDURE [tSQLt].[Private_CreateProcedureSpy]
GO
PRINT N'Dropping [tSQLt].[RunTestClass]'
GO
DROP PROCEDURE [tSQLt].[RunTestClass]
GO
PRINT N'Dropping [tSQLt].[RunWithNullResults]'
GO
DROP PROCEDURE [tSQLt].[RunWithNullResults]
GO
PRINT N'Dropping [tSQLt].[RunAll]'
GO
DROP PROCEDURE [tSQLt].[RunAll]
GO
PRINT N'Dropping [tSQLt].[Private_RunAll]'
GO
DROP PROCEDURE [tSQLt].[Private_RunAll]
GO
PRINT N'Dropping [tSQLt].[FakeTable]'
GO
DROP PROCEDURE [tSQLt].[FakeTable]
GO
PRINT N'Dropping [tSQLt].[Private_ResolveFakeTableNamesForBackwardCompatibility]'
GO
DROP FUNCTION [tSQLt].[Private_ResolveFakeTableNamesForBackwardCompatibility]
GO
PRINT N'Dropping [tSQLt].[Private_ValidateFakeTableParameters]'
GO
DROP PROCEDURE [tSQLt].[Private_ValidateFakeTableParameters]
GO
PRINT N'Dropping [tSQLt].[Private_CreateFakeOfTable]'
GO
DROP PROCEDURE [tSQLt].[Private_CreateFakeOfTable]
GO
PRINT N'Dropping [tSQLt].[Private_GetDefaultConstraintDefinition]'
GO
DROP FUNCTION [tSQLt].[Private_GetDefaultConstraintDefinition]
GO
PRINT N'Dropping [tSQLt].[Private_GetIdentityDefinition]'
GO
DROP FUNCTION [tSQLt].[Private_GetIdentityDefinition]
GO
PRINT N'Dropping [tSQLt].[Private_MarkFakeTable]'
GO
DROP PROCEDURE [tSQLt].[Private_MarkFakeTable]
GO
PRINT N'Dropping [tSQLt].[Private_IsTestClass]'
GO
DROP FUNCTION [tSQLt].[Private_IsTestClass]
GO
PRINT N'Dropping [SQLCop].[test Procedures using dynamic SQL without sp_executesql]'
GO
DROP PROCEDURE [SQLCop].[test Procedures using dynamic SQL without sp_executesql]
GO
PRINT N'Dropping [tSQLt].[Private_ApplyForeignKeyConstraint]'
GO
DROP PROCEDURE [tSQLt].[Private_ApplyForeignKeyConstraint]
GO
PRINT N'Dropping [tSQLt].[Private_GetQuotedTableNameForConstraint]'
GO
DROP FUNCTION [tSQLt].[Private_GetQuotedTableNameForConstraint]
GO
PRINT N'Dropping [tSQLt].[Private_GetForeignKeyDefinition]'
GO
DROP FUNCTION [tSQLt].[Private_GetForeignKeyDefinition]
GO
PRINT N'Dropping [tSQLt].[Private_RenameObjectToUniqueName]'
GO
DROP PROCEDURE [tSQLt].[Private_RenameObjectToUniqueName]
GO
PRINT N'Dropping [tSQLt].[Private_MarkObjectBeforeRename]'
GO
DROP PROCEDURE [tSQLt].[Private_MarkObjectBeforeRename]
GO
PRINT N'Dropping [tSQLt].[Private_RenamedObjectLog]'
GO
DROP TABLE [tSQLt].[Private_RenamedObjectLog]
GO
PRINT N'Dropping [tSQLt].[SuppressOutput]'
GO
DROP PROCEDURE [tSQLt].[SuppressOutput]
GO
PRINT N'Dropping [tSQLt].[Run]'
GO
DROP PROCEDURE [tSQLt].[Run]
GO
PRINT N'Dropping [tSQLt].[Private_Run]'
GO
DROP PROCEDURE [tSQLt].[Private_Run]
GO
PRINT N'Dropping [tSQLt].[Private_SaveTestNameForSession]'
GO
DROP PROCEDURE [tSQLt].[Private_SaveTestNameForSession]
GO
PRINT N'Dropping [tSQLt].[Private_ResolveName]'
GO
DROP FUNCTION [tSQLt].[Private_ResolveName]
GO
PRINT N'Dropping [tSQLt].[Private_ResolveObjectName]'
GO
DROP FUNCTION [tSQLt].[Private_ResolveObjectName]
GO
PRINT N'Dropping [tSQLt].[Private_CleanTestResult]'
GO
DROP PROCEDURE [tSQLt].[Private_CleanTestResult]
GO
PRINT N'Dropping [tSQLt].[Private_RunTestClass]'
GO
DROP PROCEDURE [tSQLt].[Private_RunTestClass]
GO
PRINT N'Dropping [tSQLt].[Private_GetQuotedFullName]'
GO
DROP FUNCTION [tSQLt].[Private_GetQuotedFullName]
GO
PRINT N'Dropping [tSQLt].[Private_RunTest]'
GO
DROP PROCEDURE [tSQLt].[Private_RunTest]
GO
PRINT N'Dropping [tSQLt].[GetNewTranName]'
GO
DROP PROCEDURE [tSQLt].[GetNewTranName]
GO
PRINT N'Dropping [tSQLt].[CaptureOutputLog]'
GO
DROP TABLE [tSQLt].[CaptureOutputLog]
GO
PRINT N'Dropping [tSQLt].[Private_GetCleanObjectName]'
GO
DROP FUNCTION [tSQLt].[Private_GetCleanObjectName]
GO
PRINT N'Dropping [tSQLt].[Private_OutputTestResults]'
GO
DROP PROCEDURE [tSQLt].[Private_OutputTestResults]
GO
PRINT N'Dropping [tSQLt].[GetTestResultFormatter]'
GO
DROP FUNCTION [tSQLt].[GetTestResultFormatter]
GO
PRINT N'Dropping [tSQLt].[Private_ResolveSchemaName]'
GO
DROP FUNCTION [tSQLt].[Private_ResolveSchemaName]
GO
PRINT N'Dropping [tSQLt].[Private_GetSchemaId]'
GO
DROP FUNCTION [tSQLt].[Private_GetSchemaId]
GO
PRINT N'Dropping [tSQLt].[TestClasses]'
GO
DROP VIEW [tSQLt].[TestClasses]
GO
PRINT N'Dropping [tSQLt].[XmlResultFormatter]'
GO
DROP PROCEDURE [tSQLt].[XmlResultFormatter]
GO
PRINT N'Dropping [tSQLt].[Private_PrintXML]'
GO
DROP PROCEDURE [tSQLt].[Private_PrintXML]
GO
PRINT N'Dropping [tSQLt].[Private_GetDataTypeOrComputedColumnDefinition]'
GO
DROP FUNCTION [tSQLt].[Private_GetDataTypeOrComputedColumnDefinition]
GO
PRINT N'Dropping [tSQLt].[Private_GetFullTypeName]'
GO
DROP FUNCTION [tSQLt].[Private_GetFullTypeName]
GO
PRINT N'Dropping [tSQLt].[DefaultResultFormatter]'
GO
DROP PROCEDURE [tSQLt].[DefaultResultFormatter]
GO
PRINT N'Dropping [tSQLt].[TableToText]'
GO
DROP PROCEDURE [tSQLt].[TableToText]
GO
PRINT N'Dropping [tSQLt].[TestCaseSummary]'
GO
DROP FUNCTION [tSQLt].[TestCaseSummary]
GO
PRINT N'Dropping [tSQLt].[TestResult]'
GO
DROP TABLE [tSQLt].[TestResult]
GO
PRINT N'Dropping [tSQLt].[Private_Print]'
GO
DROP PROCEDURE [tSQLt].[Private_Print]
GO
PRINT N'Dropping [tSQLt].[Private_GetLastTestNameIfNotProvided]'
GO
DROP FUNCTION [tSQLt].[Private_GetLastTestNameIfNotProvided]
GO
PRINT N'Dropping [tSQLt].[Run_LastExecution]'
GO
DROP TABLE [tSQLt].[Run_LastExecution]
GO
PRINT N'Dropping [SQLCop].[test Decimal Size Problem]'
GO
DROP PROCEDURE [SQLCop].[test Decimal Size Problem]
GO
PRINT N'Dropping [tSQLt].[AssertEqualsTable]'
GO
DROP PROCEDURE [tSQLt].[AssertEqualsTable]
GO
PRINT N'Dropping [tSQLt].[AssertObjectExists]'
GO
DROP PROCEDURE [tSQLt].[AssertObjectExists]
GO
PRINT N'Dropping [tSQLt].[TableCompare]'
GO
DROP PROCEDURE [tSQLt].[TableCompare]
GO
PRINT N'Dropping [tSQLt].[Fail]'
GO
DROP PROCEDURE [tSQLt].[Fail]
GO
PRINT N'Dropping [tSQLt].[TestMessage]'
GO
DROP TABLE [tSQLt].[TestMessage]
GO
PRINT N'Dropping types'
GO
DROP TYPE [tSQLt].[Private]
GO
PRINT N'Dropping CLR assemblies'
GO
DROP ASSEMBLY [tSQLtCLR]
GO
PRINT N'Altering [dbo].[Author_Image]'
GO
ALTER TABLE [dbo].[Author_Image] ALTER COLUMN [AuthorId] [int] NOT NULL
ALTER TABLE [dbo].[Author_Image] ALTER COLUMN [ImageId] [int] NOT NULL
GO
PRINT N'Creating primary key [PK_Author_Image] on [dbo].[Author_Image]'
GO
ALTER TABLE [dbo].[Author_Image] ADD CONSTRAINT [PK_Author_Image] PRIMARY KEY CLUSTERED  ([AuthorId], [ImageId]) ON [PRIMARY]
GO
PRINT N'Adding foreign keys to [dbo].[Author_Image]'
GO
ALTER TABLE [dbo].[Author_Image] ADD CONSTRAINT [FK_Author_Image_Author] FOREIGN KEY ([AuthorId]) REFERENCES [dbo].[Author] ([Id])
ALTER TABLE [dbo].[Author_Image] ADD CONSTRAINT [FK_Author_Image_Image] FOREIGN KEY ([ImageId]) REFERENCES [dbo].[Image] ([Id])
GO
PRINT N'Dropping schemata'
GO
DROP SCHEMA [tSQLt]
GO
